package dfbz.homework1;

public class Circle {
    private int r;

    public Circle() {
    }

    public Circle(int r) {
        this.r = r;
    }

    public int getR() {
        return r;
    }

    public void setR(int r) {
        this.r = r;
    }

    public void showArea(){
        double s=3.14*r*r;
        System.out.println("半径为:"+this.r+","+"面积为:"+s);
    }
    public void showPerimete(){
        double c=2*3.14*r;
        System.out.println("半径为:"+this.r+","+"面积为:"+c);
    }
}
